﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DBConnection;
using System.Data.Entity;
using MySqlConnection;
using Framework;

namespace Data
{
    public static class VOMapperImage
    {
        public static VOImage ImageInstanceFromData(ImageSet imgItem)
        {
            VOImage img = new VOImage();
            img.Title = imgItem.Title;
            img.Description = imgItem.Description;
            img.Link = imgItem.Link;
            img.Data = imgItem.Data;
            return img;
        }
        public static VOImage ImageInstanceFromData(ImageClass imgItem)
        {
            VOImage img = new VOImage();
            img.Id = imgItem.id;
            img.Title = imgItem.name;
            img.Description = imgItem.description;
            img.Link = string.Empty;
            img.Data = imgItem.data;
            img.Size = imgItem.size;
            return img;
        }
    }
}